home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / ailetter.tex < prev    next >
Text File  |  1991-08-03  |  1KB  |  44 lines

  1. % This can be used to print letters on AI Lab letterhead on those printers
  2. % which have them in the third tray.  It will also put the extension number
  3. % in the appropriate place at the bottom of the page; due to feeding
  4. % variability in the printer, this may sometimes be off.  Second and
  5. % subsequent pages are printed on standard paper; copy to blank bonded
  6. % paper if you so desire.
  7.  
  8. % Extension numbers are defined with other personal parameters by the
  9. % declaration
  10. %
  11. %    \extension{xxxx}
  12. %
  13. % Send bug messages to Yishai@OZ.
  14.  
  15. \makeatletter
  16. \let\@origshipout=\shipout
  17. \def\@testvbox{\vbox}
  18. \def\@aishipout#1#2{%
  19.    \def\@foo{#1}
  20.    \ifx\@foo\@testvbox
  21.        \@origshipout\vbox to 9.19in{\vskip\@origvoffset
  22.                                     \moveright\@orighoffset#1{#2}%
  23.                                     \vss
  24.                                     \hbox{\hskip 4.9in\ninrm\@extension}}
  25.     \else\errmessage{Bug in \string\ailetterhead!}
  26.        \@origshipout#1#2\fi
  27.     \special{tray 1}%
  28.     \voffset=\@origvoffset
  29.     \hoffset=\@orighoffset
  30.     \global\let\shipout=\@origshipout}
  31.  
  32. \def\ailetterhead{%
  33.  \special{tray 3}
  34.  \xdef\@origvoffset{\the\voffset}
  35.  \xdef\@orighoffset{\the\hoffset}
  36.  \hoffset=0pt
  37.  \voffset=0pt
  38.  \let\shipout=\@aishipout}
  39.  
  40. \def\@extension{}
  41. \def\extension#1{\def\@extension{#1}}
  42. \makeatother
  43.  
  44.